﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using UniMana.Utils.Data;
using UniMana.Data;

namespace UniMana.Win.Training
{
    public partial class FrmScore_ChooseTrainingProgram : DevExpress.XtraEditors.XtraForm
    {
        private DBMain m_Score = new DBMain();
        private string m_strStudentID = "";
        public FrmScore_ChooseTrainingProgram()
        {
            InitializeComponent();
        }
        public FrmScore_ChooseTrainingProgram(string studentID)
        {
            InitializeComponent();
            gctTrainingProgram.DataSource = m_Score.m_DCReadOnly.Training_TrainingPrograms.GetTrainingProgramByStudentID
                                                              (m_Score.m_DCReadOnly.Training_Student_Classes, studentID);
            m_strStudentID = studentID;
        }
        private void grvTrainingProgram_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                int _iTrainingProgramKey = int.Parse(grvTrainingProgram.GetFocusedRowCellValue(grvTrainingProgram.Columns["Training_TrainingProgramKey"]).ToString());
                FrmStudent_SubScoresByTerm f = new FrmStudent_SubScoresByTerm(m_strStudentID, _iTrainingProgramKey);
                f.ShowDialog();

            }
            catch { }
        }
    }
}